import usePermissionStore from '@/store/modules/permission'
import { doAsyncRoutes } from '@/setting'

export const usePermission = (code: any) => {
  if (doAsyncRoutes == false) return true
  const { resourcePermission } = usePermissionStore()
  return resourcePermission.includes(code)
}
